package com.wtu.alicloud.sentinel.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by chenmx on 2019-05-21.
 */
@RestController
@RequestMapping
@Slf4j
public class IndexController {

    @RequestMapping(value = "/")
    public String index() {
        return "hello sentinel";
    }

    @GetMapping("/hello")
    public String hello(@RequestParam String name) {
        log.info("invoked name = " + name);
        return "hello " + name;
    }

}
